package top.yueyazhui.account.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import top.yueyazhui.account.entity.Account;

@Mapper
public interface AccountMapper {

    @Select("select * from account_tbl where user_id = #{userId}")
    Account getAccountByUserId(@Param("userId") String userId);

    @Update("update account_tbl set money = #{money}, freeze_money = #{freezeMoney} where user_id = #{userId}")
    Integer updateAccount(Account account);
}
